//lc1550. 存在连续三个奇数的数组
class Solution {
public:
    bool threeConsecutiveOdds(vector<int>& arr) {
        int n = arr.size();
        for(int i = 0;i<n-2;i++)
            if(arr[i] * arr[i+1] * arr[i+2] % 2) //三个奇数相乘仍是奇数
                return true;
        
        return false;
    }
};

class Solution {
public:
    bool threeConsecutiveOdds(vector<int>& arr) {
        int n = arr.size();
        for(int i = 0;i<n-2;i++)
            if(arr[i] % 2 && arr[i+1] % 2 && arr[i+2] % 2)
                return true;
        
        return false;
    }
};